import { createRouter, createWebHistory } from 'vue-router'
// 由于 TypeScript 中找不到名称 “ignore”，这里推测是要忽略类型检查，正确写法为单行注释形式
// @ts-ignore 注释需放在要忽略检查的代码行上方，这里暂时保留注释格式，后续需将其放在对应代码行上方
// @ts-ignore
import LoginView from '../views/LoginView.vue'
// 为了解决找不到模块声明文件的问题，使用 @ts-ignore 临时忽略类型检查
// @ts-ignore
import HomeView from '../views/HomeView.vue' // 主页
// @ts-ignore
import HomePage from '../views/HomePage.vue' // 首页
// @ts-ignore 
import CustomerService from '../views/CustomerService.vue' // 客服中心
// @ts-ignore
import DataAnalysis from '../views/DataAnalysis.vue' // 数据分析
// @ts-ignore
import DictionaryManagement from '../views/system/DictionaryManagement.vue' // 数据字典管理
// @ts-ignore
import FinancialManagement from '../views/FinancialManagement.vue' // 财务管理
// @ts-ignore
import LogisticsManagement from '../views/logistics/LogisticsManagement.vue' // 物流管理
// @ts-ignore
import LogManagement from '../views/system/LogManagement.vue' // 日志管理
// @ts-ignore
import MarketingManagement from '../views/marketing/MarketingManagement.vue' // 营销管理
// @ts-ignore
import MenuManagement from '../views/system/MenuManagement.vue' // 菜单管理
// @ts-ignore
import OrderManagement from '../views/orders/OrderManagement.vue' // 订单管理
// @ts-ignore
import ReportManagement from '../views/ReportManagement.vue' // 报表管理
// @ts-ignore
import UserManagement from '../views/user/UserManagement.vue'     // 用户管理
// @ts-ignore
import RoleManagement from '../views/system/RoleManagement.vue'     // 角色管理
// @ts-ignore
import SystemSettings from '../views/system/SystemSettings.vue'     // 系统设置
// @ts-ignore
import ProductManagement from '../views/product/ProductManagement.vue' // 商品管理
// @ts-ignore
import ProductList from '../views/product/ProductList.vue' // 商品列表
// @ts-ignore
import ProductClassificationManagement from '../views/product/ProductClassificationManagement.vue' // 商品分类管理
// @ts-ignore
import ProductSpecificationManagement from '../views/product/ProductSpecificationManagement.vue' // 商品规格管理
// @ts-ignore
import ProductInventoryManagement from '../views/product/ProductInventoryManagement.vue' // 商品库存管理
// @ts-ignore
import ContentManagement from '../views/content/ContentManagement.vue' // 内容管理
// @ts-ignore
import ContentDisplayManagement from '../views/content/ContentDisplayManagement.vue' // 内容展示管理(轮播图、广告位、推荐位)
// @ts-ignore
import HelpCenter from '../views/content/HelpCenter.vue' // 帮助中心/文章管理 
// @ts-ignore
import LogisticsConfiguration from '../views/logistics/LogisticsConfiguration.vue' // 物流配置(区域、快递、模板)
// @ts-ignore
import MarketingEventManagement from '../views/marketing/MarketingEventManagement.vue' // 营销活动管理
// @ts-ignore
import MemberManagement from '../views/marketing/MemberManagement.vue' // 会员管理
// @ts-ignore
import APIManagement from '../views/openplatform/APIManagement.vue' // API管理
// @ts-ignore
import OpenPlatform from '../views/openplatform/OpenPlatform.vue' // 开放平台
// @ts-ignore
import ThirdPartyAuthorization from '../views/openplatform/ThirdPartyAuthorization.vue' // 第三方授权
// @ts-ignore
import OrderList from '../views/orders/OrderList.vue' // 订单列表
// @ts-ignore
import OrderAfterSalesManagement from '../views/orders/OrderAfterSalesManagement.vue' // 订单售后管理
// @ts-ignore
import OrderStateManagement from '../views/orders/OrderStateManagement.vue' // 订单状态管理
// @ts-ignore
import MallSettingsCenter from '../views/system/MallSettingsCenter.vue' // 商城设置中心
// @ts-ignore
import SystemRightsManagement from '../views/system/SystemRightsManagement.vue' // 系统权限管理
// @ts-ignore
import UserBehaviorRecordManagement from '../views/user/UserBehaviorRecordManagement.vue' // 用户行为记录管理
// @ts-ignore
import UserComplaintsSuggestions from '../views/user/UserComplaintsSuggestions.vue' // 投诉/建议管理
// @ts-ignore
import UserList from '../views/user/UserList.vue' // 用户列表
// @ts-ignore
import AIChatPage from '../views/ai/AIChatPage.vue' // AI智能客服
// @ts-ignore
import AiChat from '../views/ai/AiChat.vue' // AI智能客服SSE
// @ts-ignore
import FileManagement from '../views/file/FileManagement.vue' // 文件管理
// @ts-ignore
import FileUpload from '../views/file/FileUpload.vue' // 文件上传





// 👇 可选：布局组件（如果有）
// import DefaultLayout from '../layouts/DefaultLayout.vue'

const routes = [
  {
    path: '/',
    redirect: '/login',
    // 可选：使用 layout 布局
    // component: DefaultLayout,
    children: [
      {
        path: '/login',
        name: 'Login',
        component: LoginView
      },
      {
        path: '/home',
        name: 'Home',
        component: HomeView
      },
      {
        path: '/homePage',
        name: 'HomePage',
        component: HomePage
      },
      {
        path: '/customerService',
        name: 'CustomerService',
        component: CustomerService
      },
      {
        path: '/dataAnalysis',
        name: 'DataAnalysis',
        component: DataAnalysis
      },
      {
        path: '/dictionaryManagement',
        name: 'DictionaryManagement',
        component: DictionaryManagement
      },
      {
        path: '/financialManagement',
        name: 'FinancialManagement',
        component: FinancialManagement
      },
      {
        path: '/logisticsManagement',
        name: 'LogisticsManagement',
        component: LogisticsManagement
      },
      {
        path: '/logManagement',
        name: 'LogManagement',
        component: LogManagement
      },
      {
        path: '/marketingManagement',
        name: 'MarketingManagement',
        component: MarketingManagement
      },
      {
        path: '/menuManagement',
        name: 'MenuManagement',
        component: MenuManagement
      },
      {
        path: '/orderManagement',
        name: 'OrderManagement',
        component: OrderManagement
      },
      {
        path: '/reportManagement',
        name: 'ReportManagement',
        component: ReportManagement
      },
      {
        path: '/userManagement',
        name: 'UserManagement',
        component: UserManagement
      },
      {
        path: '/roleManagement',
        name: 'RoleManagement',
        component: RoleManagement
      },
      {
        path: '/systemSettings',
        name: 'SystemSettings',
        component: SystemSettings
      },
      {
        path: '/productManagement',
        name: 'ProductManagement',
        component: ProductManagement
      },
      {
        path: '/productList',
        name: 'ProductList',
        component: ProductList
      },
      {
        path: '/productClassificationManagement',
        name: 'ProductClassificationManagement',
        component: ProductClassificationManagement
      },
      {
        path: '/productSpecificationManagement',
        name: 'ProductSpecificationManagement',
        component: ProductSpecificationManagement
      },
      {
        path: '/productInventoryManagement',
        name: 'ProductInventoryManagement',
        component: ProductInventoryManagement
      },
      {
        path: '/contentManagement',
        name: 'ContentManagement',
        component: ContentManagement
      },
      {
        path: '/contentDisplayManagement',
        name: 'ContentDisplayManagement',
        component: ContentDisplayManagement
      },
      {
        path: '/helpCenter',
        name: 'HelpCenter',
        component: HelpCenter
      },
      {
        path: '/logisticsConfiguration',
        name: 'LogisticsConfiguration',
        component: LogisticsConfiguration
      },
      {
        path: '/marketingEventManagement',
        name: 'MarketingEventManagement',
        component: MarketingEventManagement
      },
      {
        path: '/memberManagement',
        name: 'MemberManagement',
        component: MemberManagement
      },
      {
        path: '/apiManagement',
        name: 'APIManagement',
        component: APIManagement
      },
      {
        path: '/openPlatform',
        name: 'OpenPlatform',
        component: OpenPlatform
      },
      {
        path: '/thirdPartyAuthorization',
        name: 'ThirdPartyAuthorization',
        component: ThirdPartyAuthorization
      },
      {
        path: '/orderList',
        name: 'OrderList',
        component: OrderList
      },
      {
        path: '/orderAfterSalesManagement',
        name: 'OrderAfterSalesManagement',
        component: OrderAfterSalesManagement
      },
      {
        path: '/orderStateManagement',
        name: 'OrderStateManagement',
        component: OrderStateManagement
      },
      {
        path: '/mallSettingsCenter',
        name: 'MallSettingsCenter',
        component: MallSettingsCenter
      },
      {
        path: '/systemRightsManagement',
        name: 'SystemRightsManagement',
        component: SystemRightsManagement
      },
      {
        path: '/userBehaviorRecordManagement',
        name: 'UserBehaviorRecordManagement',
        component: UserBehaviorRecordManagement
      },
      {
        path: '/userComplaintsSuggestions',
        name: 'UserComplaintsSuggestions',
        component: UserComplaintsSuggestions
      },
      {
        path: '/userList',
        name: 'UserList',
        component: UserList
      },
      {
        path: '/aiChatPage',
        name: 'AIChatPage',
        component: AIChatPage
      },
      {
        path: '/aiChat',
        name: 'AiChat',
        component: AiChat
      },
      {
        path: '/fileManagement',
        name: 'FileManagement',
        component: FileManagement
      },
      {
        path: '/fileUpload',
        name: 'FileUpload',
        component: FileUpload
      }
      
    ]
  }
]

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes
})

export default router
